
async function task() {
    for (let i = 1; i <= 5; i ++) {
        await timeCount(1000,i)
    }
}


function timeCount(time,num) {
    return new Promise((resolve, reject) => {
        setTimeout(() => {
            console.log(num)
            resolve(num)
        },time)
    })
}


task()
//? 方法2 见手写题所有重点 73
